const { sequelize } = require("../../core/db");
const { Sequelize, Model } = require("sequelize");

class Task extends Model {}

Task.init(
  {
    task_id: {
      type: Sequelize.INTEGER,
      primaryKey: true,
      autoIncrement: true,
    },
    task_name: Sequelize.STRING,
    // 任务名
    admin_id: Sequelize.INTEGER, // 创建人
    send_time: {
      // 任务执行时间
      type: Sequelize.DATE,
    },
    describe: Sequelize.STRING, // 任务描述
  },
  {
    sequelize,
    tableName: "task",
  }
);

module.exports = {
  Task,
};
